Tank_Fill

Syntax samples

TANK_FILL (<Tank ID>, <Fill Quantity>, <Fill Rate>, <Resume Level>)

TANK_FILL (HoldingTank, 2000, 75, 1500)

Description

Fills a tank using a specific quantity and rate. The default tank state sets to Tank_Filling, then to Tank_Blocked if the tank becomes full.

Use Tank_Fill when the source of the material is not another tank, but an arriving entity or a source that is not part of the model.

Components

<Tank ID>

The tank name or location index number.

<Fill Quantity>

The number of units (gallons, pounds) to fill into the tank. To fill the tank to capacity, enter Tank_Cap(<Tank ID>).

<Fill Rate>

The rate in units (gallons, pounds) per time unit defined in the General Information dialog. To instantly increase the level of a tank, use the Tank_Inc subroutine. To initialize the level of a tank (e.g., at the start of the simulation), use the Tank_SetLevel subroutine. To use a dynamically calculated rate in the Tank_Rate subroutine, enter 0.

<Resume level>

If the tank level reaches capacity before you add the specified quantity, the tank must drop to the resume level before it can continue filling. To terminate filling if the tank reaches capacity, enter Tank_Stop as the resume level. A value of 0 causes an error to occur if the tank becomes full before reaching the fill quantity.

Example

A tanker arrives and fills a storage tank by the quantity stored in the tanker’s attribute, Load_Qty. The rate of fill is 80 gpm and, if the tank fills to capacity before the tanker discharges the entire quantity, the level of the storage tank must drop to 12,000 gallons before it resumes filling. To represent this, enter the following statement in the operation logic for the tanker at the unloading station.

Tank_Fill(StorageTank, Load_Qty, 80, 12000)

See Also

Tanks and Initializing and Replenishing Supply Tanks.